package com.commerceerp.system.mapper;

import com.commerceerp.system.entity.ForderInfo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface ForderMapper {

    List<Map> getAllOrderInfoByStatus(ForderInfo forderInfo);

    List<Map> getAllForderInfoByStatus(ForderInfo forderInfo);

    Integer updForderStatus(ForderInfo forderInfo);

    Integer saveNewForderInfo(ForderInfo forderInfo);

    Integer saveNewForderRecord(@Param("frForderId")String frForderId, @Param("frPorderId")String frPorderId, @Param("frInOut")String frInOut, @Param("frMoney")BigDecimal frMoney,
                                @Param("frCreateTime")String frCreateTime,@Param("frRemark")String frRemark);

    List<Map> getAllForderRecord(@Param("frForderId")String frForderId,@Param("frPorderId")String frPorderId,@Param("frMoney")BigDecimal frMoney,
                                 @Param("frInOut")String frInOut,@Param("beginTime")String beginTime,@Param("endTime")String endTime);

    Integer updForderToReject(ForderInfo forderInfo);

    List<Map> getCountByForderStatus();

    List<Map> getAllInOutMoney(@Param("frForderId")String frForderId,@Param("frPorderId")String frPorderId,@Param("frMoney")BigDecimal frMoney,
                               @Param("frInOut")String frInOut,@Param("beginTime")String beginTime,@Param("endTime")String endTime);


    Integer saveNewForderInfoByJob(ForderInfo forderInfo);

    Integer saveNewForderRecordByJob(@Param("frForderId")String frForderId,@Param("frPorderId")String frPorderId, @Param("frInOut")String frInOut, @Param("frMoney")BigDecimal frMoney,
                                     @Param("frCreateTime")String frCreateTime,@Param("frRemark")String frRemark);

    Integer getCountByPorderStatus(@Param("minStatus") Integer minStatus,@Param("maxStatus") Integer maxStatus);

    Integer getCountByOrderStatus(@Param("minStatus") Integer minStatus,@Param("maxStatus") Integer maxStatus);
}
